package com.ruicar.afs.cloud.basic.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruicar.afs.cloud.basic.common.condition.ContractBasicListVO;
import com.ruicar.afs.cloud.basic.common.condition.QueryContractListCondition;
import com.ruicar.afs.cloud.basic.common.entity.BasicMainInfo;
import com.ruicar.afs.cloud.basic.common.vo.SettleStayVo;
import com.ruicar.afs.cloud.basic.contractcancel.condition.BasicCancelInfoCondition;
import com.ruicar.afs.cloud.basic.contractcancel.vo.BasicCancelInfoVo;
import com.ruicar.afs.cloud.basic.costexempt.condition.BasicCostExemptCondition;
import com.ruicar.afs.cloud.basic.costexempt.vo.BasicExpenseRecordDetailVo;
import com.ruicar.afs.cloud.basic.costexemptbill.condition.BasicCostExemptBillCondition;
import com.ruicar.afs.cloud.basic.costexemptbill.vo.BasicCostExemptBillInfoVo;
import com.ruicar.afs.cloud.basic.detail.vo.QueryListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: Lee
 * @date 2020-05-30 04:13:03
 * @description
 */
public interface BasicMainInfoMapper extends BaseMapper<BasicMainInfo> {

    //查询单条详情
    public SettleStayVo getStaySettleDetail(@Param("contractNo") String contractNo) ;

    //多条件查询已激活案件列表
    List<ContractBasicListVO> findActivatedContractList(@Param("query") QueryContractListCondition condition);

    //多条件查询已激活合同(获取条数)
    Integer findActivatedContractCount(@Param("query") QueryContractListCondition condition);

    IPage<List<BasicCancelInfoVo>> getBasicCancelList(Page page, @Param("query") BasicCancelInfoCondition condition);

    IPage<List<BasicCancelInfoVo>> getBasicCancelLoanList(Page page, @Param("query") BasicCancelInfoCondition condition);

    //多条件查询已激活案件列表
    IPage<List<QueryListVO>> queryContractInfo (Page page, @Param("query") QueryListVO query);

    IPage<List<BasicCostExemptBillInfoVo>> getBasicCostBillList(Page page, @Param("query") BasicCostExemptBillCondition condition);

    IPage<List<BasicCostExemptBillInfoVo>> getBasicCostBillLoanList(Page page, @Param("query")BasicCostExemptBillCondition condition);

    IPage<List<ContractBasicListVO>> getCanCostExemptListByCondition(Page page, @Param("query") BasicCostExemptCondition condition);

    IPage<BasicExpenseRecordDetailVo> getCanCostExemptListByContractNo(Page page, @Param("query")BasicCostExemptCondition condition);
}
